<?php 
session_start();
include 'Classes/MyClass.php';
$objMyClass = new MyClass();
$objMyClass1 = new MyClass();
$objMyClass2 = new MyClass();
$objMyClass3 = new MyClass();
$objMyClass4 = new MyClass();
$objMyClass5 = new MyClass();

$objMyClass5->UpdateUserRecords($_SESSION['u_name'],$_REQUEST["txtName"],$_REQUEST["txtDOB"], $_REQUEST["txtVerifyEmail"]);

$objMyClass->DeleteWorkDetails($_SESSION["user_id"]);
$objMyClass1->DeleteEducationDetails($_SESSION["user_id"]);
$objMyClass2->DeleteAddEducationDetails($_SESSION["user_id"]);
$objMyClass3->DeleteExtraCurricularDetails($_SESSION["user_id"]);
$objMyClass4->DeleteGMATDetails($_SESSION["user_id"]);
for($i = 0;$i < count($_REQUEST["ddlCompany"]);$i++)
{
	$objMyClass->InsertWorkDetails($_SESSION["user_id"],$_REQUEST["ddlCompany"][$i],$_REQUEST["txtDepartment"][$i],$_REQUEST["ddlDesignation"][$i],(($_REQUEST["txtWorkYear"][$i]*12)+ $_REQUEST["txtWorkMonth"][$i]));
}
for($j = 0;$j < count($_REQUEST["ddlUniversity"]);$j++)
{
	$objMyClass1->InsertEducationDetails($_SESSION["user_id"],$_REQUEST["ddlUniversity"][$j],$_REQUEST["ddleducationyear"][$j],$_REQUEST["txtCourse"][$j],$_REQUEST["ddlGrade"][$j],$_REQUEST["ddlEducation"]);
}
for($l = 0;$l < count($_REQUEST["ddlAdditionalEducation"]);$l++)
{
	$objMyClass2->InsertAddEducationDetails($_SESSION["user_id"],$_REQUEST["ddlAdditionalEducation"][$l]);
}
for($m = 0; $m < count($_REQUEST["txtOrganization"]); $m++)
{
	$objMyClass3->InsertExtraCurricularDetails($_SESSION["user_id"],$_REQUEST["txtOrganization"][$m],$_REQUEST["ddldesign"][$m],$_REQUEST["txtKeyProject"][$m],$_REQUEST["txtHourPerWeek"][$m]);
}

$objMyClass4->InsertGMATDetails($_SESSION["user_id"],$_REQUEST["stName2"],$_REQUEST["stName4"]);

//header("Location:Reports.php");
?>
<script>
	window.open('Reports.php','_self');
</script>